<template>
  <div class="method">
    <div class="method__table" style="width:450px;">
      <!-- <div>{{m.start}}  {{m.end}}</div> -->
      <div class="method__row" v-for="(p,index) in m.params" :key="index">
        <div class="method__item">{{p.name}}</div>
        <div class="method__item">{{p.type}}</div>
        <div class="method__item">{{p.desc}}</div>
      </div>
      <div class="method__row" v-if="m.return">
        <div class="method__item">返回值</div>
        <div class="method__item">{{m.return.type}}</div>
        <div class="method__item">{{m.desc}}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['m'],
};
</script>

<style>
.method {
  padding-top: 5px;
}
.method__table {
  border: solid 1px #eaeaea;
}
.method__row {
  display: flex;
}
.method__row:nth-child(odd) {
  background: #f3f3f3;
}
.method__row:nth-child(even) {
  background: #fff;
}
.method__item {
  flex: 1 1;
  padding: 5px;
}
.method__btn {
  color: #39CB8A;
  line-height: 30px;
  text-decoration: underline;
  cursor: pointer;
}
</style>
